﻿using NHibernate;
using NHibernate.SqlCommand;
using System;

namespace IceZero.DataStore
{
    /// <summary>
    /// 原始 sql 语句查看器
    /// </summary>
    public class RawSqlWatcher : EmptyInterceptor
    {
        public override SqlString OnPrepareStatement(SqlString sql)
        {
            Console.WriteLine($"raw sql:\r\n--------\r\n{sql}\r\n--------\r\n");
            return base.OnPrepareStatement(sql);
        }
    }
}
